import { ILink } from '@/interface';
import { $get, $post, $put, $delete } from '@/request/api';

export function fetchLinkList(params) {
  return $get('/link/list',params);
}

export function fetchCreateLink(data: ILink) {
  return $post('/link/create',data);
}
export function fetchUpdateLink(data: ILink) {
  return $put(`/link/update/${data.id}`,data);
}
export function fetchDeleteLink(id: number) {
  return $delete(`/link/delete/${id}`);
}
